Learn R Programming

modello (version 0.1.1)

^.modello_number: Number Power

Description

Calculates the power of number by another.

Usage

# S3 method for modello_number
^(e1, e2)

`**.modello_number`(e1, e2)

Arguments

e1

a reference object of class 'number'

e2

a reference object of class 'number

Value

Returns a reference object of class 'number'

Examples

Run this code
# NOT RUN {
modello.init(10, 10, 10, 10)
## Scalar ** scalar
x1 = number(2, scalar=TRUE)
x2 = number(2, scalar=TRUE)
x3 = x1 ** x2
print(x3)
print(x3$v)
## Array ** scalar
x4 = number(matrix(2, 2, 2))
x5 = x1 ** x4
print(x5)
print(x5$v)
##Array ** array
x6 = number(c(3, 3))
x7 = x4 ** x6
print(x7)
print(x7$v)
modello.close()
# }

Run the code above in your browser using DataLab